using System.ComponentModel;

namespace SumerCoreDevOps.Application.Dtos.Requests.Users
{
    /// <summary>
    /// 创建用户请求
    /// </summary>
    public class CreateUserRequest
    {
        /// <summary>
        /// 用户名
        /// </summary>
        /// <example>john_doe</example>
        [Description("用户名")]
        public string Username { get; set; } = null!;

        /// <summary>
        /// 密码
        /// </summary>
        /// <example>Password123!</example>
        [Description("用户密码")]
        public string Password { get; set; } = null!;

        /// <summary>
        /// 邮箱
        /// </summary>
        /// <example>john@example.com</example>
        [Description("用户邮箱")]
        public string Email { get; set; } = null!;

        /// <summary>
        /// 显示名称
        /// </summary>
        /// <example>John Doe</example>
        [Description("用户显示名称")]
        public string? DisplayName { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        /// <example>admin</example>
        [Description("创建者")]
        public string? CreatedBy { get; set; }
    }

    /// <summary>
    /// 修改密码请求
    /// </summary>
    public class ChangePasswordRequest
    {
        /// <summary>
        /// 旧密码
        /// </summary>
        /// <example>OldPassword123!</example>
        [Description("旧密码")]
        public string OldPassword { get; set; } = null!;

        /// <summary>
        /// 新密码
        /// </summary>
        /// <example>NewPassword123!</example>
        [Description("新密码")]
        public string NewPassword { get; set; } = null!;
    }

    /// <summary>
    /// 重置密码请求（管理员操作）
    /// </summary>
    public class ResetPasswordRequest
    {
        /// <summary>
        /// 操作者
        /// </summary>
        /// <example>admin</example>
        [Description("操作者")]
        public string? OperatedBy { get; set; }
    }

    /// <summary>
    /// 锁定用户请求
    /// </summary>
    public class LockUserRequest
    {
        /// <summary>
        /// 锁定原因
        /// </summary>
        /// <example>违反使用规定</example>
        [Description("锁定原因")]
        public string? Reason { get; set; }

        /// <summary>
        /// 操作者
        /// </summary>
        /// <example>admin</example>
        [Description("操作者")]
        public string? OperatedBy { get; set; }
    }

    /// <summary>
    /// 解锁用户请求
    /// </summary>
    public class UnlockUserRequest
    {
        /// <summary>
        /// 操作者
        /// </summary>
        /// <example>admin</example>
        [Description("操作者")]
        public string? OperatedBy { get; set; }
    }

    /// <summary>
    /// 验证凭据请求
    /// </summary>
    public class ValidateCredentialsRequest
    {
        /// <summary>
        /// 用户名
        /// </summary>
        /// <example>admin</example>
        [Description("用户名")]
        public string Username { get; set; } = null!;

        /// <summary>
        /// 密码
        /// </summary>
        /// <example>Password123!</example>
        [Description("密码")]
        public string Password { get; set; } = null!;
    }
}
